package com.example.lxj.sources.service.impl;

import java.util.List;

import cn.hutool.core.date.DateUtil;
import com.example.lxj.sources.entity.TbIdentificationSites;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.lxj.sources.mapper.TbIdentificationSitesMapper;
import com.example.lxj.sources.service.ITbIdentificationSitesService;

/**
 * 鉴定场所Service业务层处理
 * 
 * @author lxj
 * @date 2024-10-15
 */
@Service
public class TbIdentificationSitesServiceImpl implements ITbIdentificationSitesService 
{
    @Autowired
    private TbIdentificationSitesMapper tbIdentificationSitesMapper;

    /**
     * 查询鉴定场所
     * 
     * @param id 鉴定场所主键
     * @return 鉴定场所
     */
    @Override
    public TbIdentificationSites selectTbIdentificationSitesById(Long id)
    {
        return tbIdentificationSitesMapper.selectTbIdentificationSitesById(id);
    }

    /**
     * 查询鉴定场所列表
     * 
     * @param tbIdentificationSites 鉴定场所
     * @return 鉴定场所
     */
    @Override
    public List<TbIdentificationSites> selectTbIdentificationSitesList(TbIdentificationSites tbIdentificationSites)
    {
        return tbIdentificationSitesMapper.selectTbIdentificationSitesList(tbIdentificationSites);
    }

    /**
     * 新增鉴定场所
     * 
     * @param tbIdentificationSites 鉴定场所
     * @return 结果
     */
    @Override
    public int insertTbIdentificationSites(TbIdentificationSites tbIdentificationSites)
    {
        tbIdentificationSites.setCreateTime(DateUtil.date());
        return tbIdentificationSitesMapper.insertTbIdentificationSites(tbIdentificationSites);
    }

    /**
     * 修改鉴定场所
     * 
     * @param tbIdentificationSites 鉴定场所
     * @return 结果
     */
    @Override
    public int updateTbIdentificationSites(TbIdentificationSites tbIdentificationSites)
    {
        tbIdentificationSites.setUpdateTime(DateUtil.date());
        return tbIdentificationSitesMapper.updateTbIdentificationSites(tbIdentificationSites);
    }

    /**
     * 批量删除鉴定场所
     * 
     * @param ids 需要删除的鉴定场所主键
     * @return 结果
     */
    @Override
    public int deleteTbIdentificationSitesByIds(Long[] ids)
    {
        return tbIdentificationSitesMapper.deleteTbIdentificationSitesByIds(ids);
    }

    /**
     * 删除鉴定场所信息
     * 
     * @param id 鉴定场所主键
     * @return 结果
     */
    @Override
    public int deleteTbIdentificationSitesById(Long id)
    {
        return tbIdentificationSitesMapper.deleteTbIdentificationSitesById(id);
    }
}
